<template>
  <div>
    <h1>v-bind动态样式绑定</h1>
    <p :class="{redStr:flag}">红色的文字</p>
    <h2 :style="{color: blueStr}">蓝色的文字</h2>
  </div>
</template>

<script>
export default {
  data () {
    return {
      flag: true,
      blueStr: 'blue'
    }
  }
}
</script>

<style scoped>
.redStr {
  font-size: 24px;
  color: red;
}
</style>